#ifndef _ProcManager
#define _ProcManager

#include "NodeManager.h"
#include "TaskManager.h"
#include "Priority.h"
#include "Cpu.h"
#include "Log.h"

class ProcManager {
public:
	NodeManager *nm;
	TaskManager *tm;
	Task *curr;
	Log *log;
	Priority pri;
	Cpu *cpu;

	// Constructor
	ProcManager(NodeManager *nm, TaskManager *tm, Log *pm);

	// Is cpu ready to start a new thread?
	bool isReadyCPU();

	// Is there a task ready to be worked on?
	char* isReadyTask();

	// get the next task ready to have its thread count increased
	char* getAddThread(int /*max_threads*/);
	// get the next task ready to have its thread count decreased
	char* getDelThread(int /*min_threads*/);

	// for debug, dumps each task's block status
	void dump();
};

#endif // _ProcManager